<h1>View Role <?= $role->id ?></h1>
<?= link_to('List roles', array('controller' => 'role', 'action' => 'enlist')) ?>

<p>Id: <?= $role->id ?></p>
<p>Name: <?= $role->name ?></p>
<p>Description: <?= $role->description ?></p>
<p>Users:<br />
<ul>
  <? foreach($role->users as $user) :?>
    <li><?= link_to($user->login,   array('controller' => 'user', 'action' => 'view', 'id' => $user->id)) ?></li>
  <? endforeach ?>
</ul>
</p>
<p>Permissions:<br />
<ul>
  <? foreach($role->permissions as $permission) :?>
    <li><?= link_to($permission->name, array('controller' => 'permission', 'action' => 'view', 'id' => $permission->id)) ?></li>
  <? endforeach ?>
</ul>
</p>

<?= link_to('Edit', array('controller' => 'role', 'action' => 'edit', 'id' => $role->id)) ?> 
 | <?= link_to('Delete', array('controller' => 'role', 'action' => 'delete', 'id' => $role->id)) ?>